package hr.mapper;

import hr.entity.DO.PositionEmployeesDO;
import hr.entity.DO.PositionsDepartmentDO;
import hr.entity.Position;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 岗位信息表 Mapper 接口
 * </p>
 *
 * @author zzh
 * @since 2023-12-06
 */
@Mapper
public interface PositionMapper extends BaseMapper<Position> {

    //获取岗位列表
    List<PositionsDepartmentDO> selectAllPosition(@Param("pt") String positionName, @Param("ps") String positionStatus, @Param("offset") Long offset, @Param("limit") Long limit);

    List<Position> getPositionIdAndName();

    //岗位下员工查询
    List<PositionEmployeesDO> getEmployeeByPositionId(@Param("positionId") Integer positionId, @Param("name") String name, @Param("offset") Long offset, @Param("limit") Long limit);

    Position selectByPositionId(@Param("positionId") Integer positionId);

    //查询岗位列表总条数
    Integer findCount(@Param("pn") String positionName, @Param("ps") String positionStatus);

    int deletePostByProbationId(@Param("positionId") Integer positionId);

    List<Position> getPositionsSalary();


    List<Map<String, Object>> selectPositionsPeoples();

}
